﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ParkingLot.Utility.Extend
{
    public static class ArrayExtend
    {
        public static string ToInString(this List<int> lisValue)
        {
            StringBuilder sbInValues = new StringBuilder();
            foreach (var id in lisValue)
            {
                sbInValues.Append($"'{id}',");
            }
            string strInValues = sbInValues.ToString().TrimEnd(",".ToCharArray());
            string result = $"({strInValues})";
            return result;
        }

        public static string ToInString(this List<string> lisValue)
        {
            StringBuilder sbInValues = new StringBuilder();
            foreach (var id in lisValue)
            {
                sbInValues.Append($"'{id}',");
            }
            string strInValues = sbInValues.ToString().TrimEnd(",".ToCharArray());
            string result = $"({strInValues})";
            return result;
        }
    }
}
